<?php
// +---------------------------------------------------------------------+
// | OneBase    | [ WE CAN DO IT JUST THINK ]                            |
// +---------------------------------------------------------------------+
// | Licensed   | http://www.apache.org/licenses/LICENSE-2.0 )           |
// +---------------------------------------------------------------------+
// | Author     | Bigotry <3162875@qq.com>                               |
// +---------------------------------------------------------------------+
// | Repository | https://gitee.com/Bigotry/OneBase                      |
// +---------------------------------------------------------------------+

// 扩展函数文件，系统研发过程中需要的函数建议放在此处，与框架相关函数分离

function getGoodsInfo($where=1,$field="*"){
    $goods = \think\Db::name('Goods')->where($where)->field($field)->find();
    return $goods[$field];
}

function getOrderStatus($key){
    return config('order_status')[$key];
}

function userLogin(){
    $uid = session('userid');
    if(!$uid){
        return false;
    }else{
        return $uid;
    }
}